;+
; NAME:
;       CHECK_BGPS_PPBEAM
;
; PURPOSE:
;       Checks the FITS keyword PPBEAM in the BGPS v1.0.2 images to
;       ensure it is the correct value.  Apparently, when the FITS
;       images were created, there was some confusion about the
;       correct value of this keyword.  The correct value was inserted
;       into the maps published at IPAC, but not necessarily for all
;       files held locally on milkyway.colorado.edu.
;
; CATEGORY:
;       distance-omnibus utility
;
; CALLING SEQUENCE:
;       res = CHECK_BGPS_PPBEAM( hdr )
;
; INPUTS:
;       HDR -- The FITS header from a BGPS map.
;
; OPTIONAL INPUTS:
;       NONE
;
; KEYWORD PARAMETERS:
;       NONE
;
; OUTPUTS:
;       RES -- 0 for header is OKAY, and 1 for header was CORRECTED
;
; OPTIONAL OUTPUTS:
;       NONE
;
; MODIFICATION HISTORY:
;
;       Created:  07/19/11, TPEB -- Initial Version.
;
;-

FUNCTION CHECK_BGPS_PPBEAM, hdr
  
  COMPILE_OPT OBSOLETE
  
  ;; This is the value calculated by Adam for a 33" beam
  ppb = 23.802759425394552d
  
  IF abs(sxpar(hdr,'PPBEAM') - 23.8) LE 0.1 THEN RETURN,0b ELSE BEGIN
     sxaddpar, hdr, 'PPBEAM', ppb, FORMAT="G19.12"
     message,'Correcting the PPBEAM for this file.',/inf
     RETURN,1b
  ENDELSE
END
